package com.xiaozhengkeji.springboot.speed.utils;

import com.alipay.api.AlipayClient;
import com.alipay.api.DefaultAlipayClient;


public class AlipayUtils {
    //应用ID
    private static String APP_ID = "";
    //测试应用ID
    private static String C_APP_ID = "2016102100730110";
    //密匙
    private static String APP_PRIVATE_KEY = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCxK8yLXBr7CaZvKr2udBqT2wRek4rOteOW9a6QFjkgmBTV/3Y+r4/UQrKHVJYtYpbCdeHIMsBYXRSj2nbna2aV2ngc2yY/Ne0T5O8hT4hTDn0fMCFuCdUAZ+n9ILDSu7J4PaFQhhxD58exXhFRlTjDbXWV+IhiI5H9J4MeR5Po8C4n5eAQ36HnMuMnH732w5ipmB7UkoPF9wPFyMDh0ILAdfLPhEvKfHTyL01nK8bbZUpHFMZmfx6UrJChAM8DGGaUzjgK5VNe0Y1Le3yM8Qsdem3CahTvQvPz8p6YZeCjyORCbVmQw7UOz+9dRuvpcqdw06hpWnbtTUW4yW2iPDjhAgMBAAECggEAEVWDsa7VRPJwwjegT000vHqVNtugnRDWr5Jh/d7uv+2hPD6+RuvOWqob5Xm1J8OZlHUMHhY5E2wn9NAPCh1L8CVr0wbt+wk/pM6lRtENOXMVctO2sZlsqZmBHy7vne6XS4RcIBC++zXWJ9hYQW8kGpq/AmlKjq+EPQx8m53NLuEHNkzNhecSKxGDI+mCOmyMghjRszJJUXrVw3RvdLslucNBx5aJ6ocB7yzP59008Skum66pNVAVJLExNGzOHoLxOeRj8WvC/lLNvctsYGSYJt7kFD2AgShZElvdkfHAhUHX+lzNyIaFEhhx4BsU+PR+XQHEpyLiJQflsPkedCgAAQKBgQDWnN6OKh0pm8vqURy8wu9nbyjnl9zP4k8At6CLKrGblDkqWdsd1arW6CADneKjCTeEr3kXGv0SggTM7V8r2mTFXTxMM4LGnAINwjoBCr0XwIdzw9cZcPaNTv9To2md+KQJAmamN8R6NazRrdCf6DjJ9mBAWil+9jXxp678U0AO4QKBgQDTVnyMFYc32Yxp2NxFjpZuSbZzSLAXtiKxMnsjTZ1Jq/VqSEsOSwUupA+k8sNwORnRiQZUREUaajzZWzya4cCTcxLi02d76L9dp98uD6irhOmYnJ1VTHAVulAU5+rBMODvNFY5wy+OL/QqR55WtAg5ua/d4drWwDt4w2BqEjNqAQKBgBZrIJx9Lbqw+aYqfvQA8P0/EWjP5lMY8uPCStT+yrrTyvzvkgIV1djJOr7l+UzKo7AKnH2bZiBO0K2PhkeQcsJjMO9M2jZhCZ3iUijVtFcM15lyNcAEmty8CdP02A2WcZw3Uf2/CZkyjjEBFS//FB+Uyw0t3fPTSGNL/u2AzMpBAoGAS6EOrx7hJeZvbk2R/j5ZrRwp87WWdtXSMnFrSaXz3LJx/9fhLDtCnn9NrezGbfmxOJ/9qNhJlntgTTRuSsrxHJM4tf2LcfdHzF9P6e7moILPCbM6RpU1I0FqeSDJjNtOE6w6Ey+7a/nTOfIpQsPokafWvOOfaeyfG8dnUG41AgECgYBBkmI276oNfcs7H/VCMqtrzwsdLJxmL11jL3MnAunqR5rYF7Qv6LigeFHQxQ1NOlOp8AzkiTQi1KD8Mk3Efm6NvR16AF+orGl/hQWQdW7iIkIFQGLFXPsBNCirCJIzXmNNxa90Hjk9WPjhgOBtYdvtdh61czKy1nfbPa1r2SD02w==";
    //支付宝公匙
    private static String ALIPAY_PUBLIC_KEY = "";
    //沙盒支付宝
    private static String C_ALIPAY_PUBLIC_KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiEms1bwt2hFBSVM7U6jY9sOHmdMDb347xoA7X03lHOpYYPBzZl/k3EWch27eaOi09wXr1/htozc90xkshbXqMHvZU9XH23/ZWckOX9OrxHWiq/retx1aCXPw/NI6x+ovY44RVN3QCH7PvnMVa15NspE10A758QnigcBehTaDa3/mNeqaIH67SyOGDY902H6SIm+VVJnKWFXqzSvAli+tgdFh06mujP3dcZ/dtQTeKrb9x2XLBgKmYlfvDKbM6knRA+IRC3bIn0zMpYjCr8WV8Gg3h4mVGDDUUQFCnYknLh3q6S5MPSA2H/b3veS/Qbf8mi9ZL3Kr7mEZmf1l63rpiQIDAQAB";
    private static String CHARSET = "UTF-8";
    //支付宝网关
    private static String API = "https://openapi.alipay.com/gateway.do";
    //测试支付宝网关
    private static String C_API = "https://openapi.alipaydev.com/gateway.do";
    private static AlipayClient alipayClient = new DefaultAlipayClient(API,
            APP_ID, APP_PRIVATE_KEY, "json", CHARSET, ALIPAY_PUBLIC_KEY, "RSA2");
    private static AlipayClient alipayClient_Dev = new DefaultAlipayClient(C_API,
            C_APP_ID, APP_PRIVATE_KEY, "json", CHARSET, C_ALIPAY_PUBLIC_KEY, "RSA2");
    /* 获取支付宝客户端 */
    public static AlipayClient getAlipayClient() {
        return alipayClient_Dev;
    }
}
